/**
 * File    : ApprovalManager.java
 * Created : 2008-10-10
 * By      : LuHuiguo
 */
package com.luhuiguo.sso.service;

import java.util.List;

import com.luhuiguo.sso.entity.Approval;
import com.luhuiguo.sso.entity.Site;
import com.luhuiguo.sso.entity.User;

/**
 * @author LuHuiguo
 * @version $Id: ApprovalManager.java 9 2008-10-12 12:51:20Z LuHuiguo $
 * 
 */
public interface ApprovalManager {

	Approval getApproval(Long id);

	Approval getApproval(User user, String url);

	Approval getApproval(User user, Site site);

	Approval getApproval(String username, String url);

	List<Approval> getAllApproval(int... rowStartIdxAndCount);

	void createApproval(Approval approval);

	void updateApproval(Approval approval);

	void deleteApproval(Long id);

	void deleteApproval(Approval approval);

	Approval setApproval(User user, String url, long personaId,
			boolean alwaysAllow);

}
